<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<title></title>
	<link rel="stylesheet" type="text/css" href="/Public/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="/Public/Admin/css/table.css" media="all">
</head>
<body>
<div>
	<div class="title">数据备份</div>
	<blockquote class="layui-elem-quote">这个貌似不用多介绍，因为你已经在太多的地方都看到</blockquote>&nbsp;&nbsp;
    <a href="./index" ><button class="layui-btn" ><i class="layui-icon"></i>数据表列表</button></a>&nbsp;&nbsp;
	<a href="./import" ><button class="layui-btn"><i class="layui-icon"></i>查看备份</button></a>&nbsp;&nbsp;
	<a href="./repair" ><button class="layui-btn"><i class="layui-icon"></i>优化表</button></a>&nbsp;&nbsp;
    <a href="./repair" ><button class="layui-btn"><i class="layui-icon"></i>修复表</button></a>&nbsp;&nbsp;
    <a href="javascript:;" class="real"><button class="layui-btn"><i class="layui-icon"></i>刷新一下</button></a>&nbsp;&nbsp;
</div>
<span class="tabscount"><span class="padding"><a href="javascript:;" id="backup_all" title="一键还原全部备份">一键还原</a></span><a href="javascript:;" id="del_backup_all" title="一键删除全部备份">一键删除</a>&nbsp;&nbsp;总共<span class="counts"><?php echo ($tables); ?></span>份备份,共<?php echo ($total); ?></span>
<div class="layui-form">
  <table class="layui-table" >
    <colgroup>
      <col width="50">
      <col width="150">
      <col width="150">
      <col width="200">
      <col>
    </colgroup>
    <thead>
      <tr>
        <th class="minwidth50">序号</th>
        <th class=" minwidth200">备份名称</th>
        <th class="">卷数</th>
        <th class="">压缩</th>
        <th class="">数据大小</th>
        <th class="">备份时间</th>
        <th class="">备份表</th>
        <th class="">状态</th>
        <th class="minwidth50">操作</th>
      </tr> 
    </thead>
    <tbody>
  <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$table): $mod = ($i % 2 );++$i;?><tr >
          <td ><?php echo ($i); ?></td>
          <td><?php echo (date('YmdHis',$table["time"])); ?></td>
          <td><?php echo ($table["part"]); ?></td>
          <td><?php echo ($table["compress"]); ?></td>
          <td><?php echo (format_bytes($table["size"])); ?></td>
          <td><?php echo (date('Y-m-d H:i:s',$table["time"])); ?></td>
          <td><?php echo ($table["fname"]); ?></td>
          <td>-</td>
          <td class="action minwidth50">
          <a class="db-import dorestore" href="javascript:;" title="还原当前备份" data-name="<?php echo ($table["filename"]); ?>" data-row="<?php echo ($i); ?>">还原</a>
          &nbsp;
          <a class="ajax-get confirm" href="<?php echo U('delfile', array('time' => $table['filename']));?>" title="删除当前备份" data-name="<?php echo ($table["filename"]); ?>" data-row="<?php echo ($i); ?>" onclick="return confirm('确定删除该条记录?')">删除</a>
          </td>
      </tr><?php endforeach; endif; else: echo "" ;endif; ?>
    </tbody>
  </table>
<script src="/Public/js/jquery-1.8.3.min.js" ></script>
<script src="/Public/layui/layui.js" ></script>
<script src="/Public/admin/js/table.js" ></script>
</body>
</html>